<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: cfg/cfg_manager_fwd.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Public API.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_cfb2ffb2869bbb27b7281952022eb856.html">cfg</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">cfg_manager_fwd.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespaceflow"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow.html">flow</a></td></tr>
<tr class="memdesc:namespaceflow"><td class="mdescLeft">&#160;</td><td class="mdescRight">Catch-all namespace for the Flow project: A collection of various production-quality modules written in modern C++17, originally by ygoldfel. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:namespaceflow_1_1cfg"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1cfg.html">flow::cfg</a></td></tr>
<tr class="memdesc:namespaceflow_1_1cfg"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flow module that facilitates configuring modules, such as applications and APIs, via statically and/or dynamically parsed sets of name/value pairs from config sources like files and command lines. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a1e8c66781034dd50ad8e2de9c0c47e0e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cfg__manager__fwd_8hpp.html#a1e8c66781034dd50ad8e2de9c0c47e0e">FLOW_CFG_OPT_CHECK_ASSERT</a>(ARG_must_be_true)</td></tr>
<tr class="memdesc:a1e8c66781034dd50ad8e2de9c0c47e0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience macro particularly useful in the <code>final_validator_func()</code> callback taken by various Config_manager APIs; checks the given condition; if <code>false</code> logs a <a class="el" href="log_8hpp.html#a626c7dc4d3b4dc0b32a8aac8624d66bc" title="Logs a WARNING message into flow::log::Logger *get_logger() with flow::log::Component get_log_compone...">FLOW_LOG_WARNING()</a> containing the failed condition and executes <code>outcome = flow::cfg::Final_validator_func::S_FAIL;</code>; otherwise no-op.  <a href="cfg__manager__fwd_8hpp.html#a1e8c66781034dd50ad8e2de9c0c47e0e">More...</a><br /></td></tr>
<tr class="separator:a1e8c66781034dd50ad8e2de9c0c47e0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a80b3319f3d3a657837d0d8b28d22ccc3"><td class="memItemLeft" align="right" valign="top">enum class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1cfg.html#a80b3319f3d3a657837d0d8b28d22ccc3">flow::cfg::Final_validator_outcome</a> { <a class="el" href="namespaceflow_1_1cfg.html#a80b3319f3d3a657837d0d8b28d22ccc3a655ec6aa779cb1c799c9ba80f24e9567">flow::cfg::S_ACCEPT</a>
, <a class="el" href="namespaceflow_1_1cfg.html#a80b3319f3d3a657837d0d8b28d22ccc3ace64a8fc2c16fb21be22f603ef4d2eec">flow::cfg::S_SKIP</a>
, <a class="el" href="namespaceflow_1_1cfg.html#a80b3319f3d3a657837d0d8b28d22ccc3aec1a4aed91659725c96b0b8378dba316">flow::cfg::S_FAIL</a>
 }</td></tr>
<tr class="memdesc:a80b3319f3d3a657837d0d8b28d22ccc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Result enumeration for a Final_validator_func::Type function which is used by a Config_manager user when parsing a config source (ex: file).  <a href="namespaceflow_1_1cfg.html#a80b3319f3d3a657837d0d8b28d22ccc3">More...</a><br /></td></tr>
<tr class="separator:a80b3319f3d3a657837d0d8b28d22ccc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a453d83bf1e8b57b1aaff511fbe913ecc"><td class="memTemplParams" colspan="2">template&lt;typename... S_d_value_set&gt; </td></tr>
<tr class="memitem:a453d83bf1e8b57b1aaff511fbe913ecc"><td class="memTemplItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceflow_1_1cfg.html#a453d83bf1e8b57b1aaff511fbe913ecc">flow::cfg::operator&lt;&lt;</a> (std::ostream &amp;os, const Config_manager&lt; S_d_value_set... &gt; &amp;val)</td></tr>
<tr class="memdesc:a453d83bf1e8b57b1aaff511fbe913ecc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serializes (briefly) a <a class="el" href="classflow_1_1cfg_1_1Config__manager.html" title="Manages a config setup, intended for a single daemon process, by maintaining 1 or more set(s) of stat...">Config_manager</a> to a standard output stream.  <a href="namespaceflow_1_1cfg.html#a453d83bf1e8b57b1aaff511fbe913ecc">More...</a><br /></td></tr>
<tr class="separator:a453d83bf1e8b57b1aaff511fbe913ecc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a1e8c66781034dd50ad8e2de9c0c47e0e" name="a1e8c66781034dd50ad8e2de9c0c47e0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e8c66781034dd50ad8e2de9c0c47e0e">&#9670;&nbsp;</a></span>FLOW_CFG_OPT_CHECK_ASSERT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FLOW_CFG_OPT_CHECK_ASSERT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ARG_must_be_true</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line">  <a class="code hl_define" href="util__fwd_8hpp.html#a402a1fb61d3fe4ca6767729e38620d6d">FLOW_UTIL_SEMICOLON_SAFE</a> \</div>
<div class="line">    ( \</div>
<div class="line">      if (!(ARG_must_be_true)) \</div>
<div class="line">      { \</div>
<div class="line">        FLOW_LOG_WARNING(<span class="stringliteral">&quot;Validation failed; the following condition must hold: [&quot;</span> #ARG_must_be_true <span class="stringliteral">&quot;].&quot;</span>); \</div>
<div class="line">        outcome = ::flow::cfg::Final_validator_outcome::S_FAIL; \</div>
<div class="line">      } \</div>
<div class="line">    )</div>
<div class="ttc" id="autil__fwd_8hpp_html_a402a1fb61d3fe4ca6767729e38620d6d"><div class="ttname"><a href="util__fwd_8hpp.html#a402a1fb61d3fe4ca6767729e38620d6d">FLOW_UTIL_SEMICOLON_SAFE</a></div><div class="ttdeci">#define FLOW_UTIL_SEMICOLON_SAFE(ARG_func_macro_definition)</div><div class="ttdoc">Use this to create a semicolon-safe version of a &quot;void&quot; functional macro definition consisting of at ...</div><div class="ttdef"><b>Definition:</b> util_fwd.hpp:1079</div></div>
</div><!-- fragment -->
<p>Convenience macro particularly useful in the <code>final_validator_func()</code> callback taken by various Config_manager APIs; checks the given condition; if <code>false</code> logs a <a class="el" href="log_8hpp.html#a626c7dc4d3b4dc0b32a8aac8624d66bc" title="Logs a WARNING message into flow::log::Logger *get_logger() with flow::log::Component get_log_compone...">FLOW_LOG_WARNING()</a> containing the failed condition and executes <code>outcome = flow::cfg::Final_validator_func::S_FAIL;</code>; otherwise no-op. </p>
<p >Note the context must be such that <a class="el" href="log_8hpp.html#a626c7dc4d3b4dc0b32a8aac8624d66bc" title="Logs a WARNING message into flow::log::Logger *get_logger() with flow::log::Component get_log_compone...">FLOW_LOG_WARNING()</a> compiles and acts properly.</p>
<p >If <code>auto outcome = flow::cfg::Final_validator_func::S_ACCEPT;</code> precedes multiple invocations of this macro, then by the end of those invocations <code>outcome == S_ACCEPT</code> if and only if all checks passed. All errors will be printed if <code>outcome != S_ACCEPT</code>.</p>
<p >Informally: If you have a condition that would cause your <code>final_validator_func()</code> to return <a class="el" href="namespaceflow_1_1cfg.html#a80b3319f3d3a657837d0d8b28d22ccc3ace64a8fc2c16fb21be22f603ef4d2eec" title="The holistically-checked cumulative Value_set has contents such that the validator function decided t...">flow::cfg::Final_validator_outcome::S_SKIP</a>, then it is probably best to check for this potential condition, and <code>return <a class="el" href="namespaceflow_1_1cfg.html#a80b3319f3d3a657837d0d8b28d22ccc3ace64a8fc2c16fb21be22f603ef4d2eec" title="The holistically-checked cumulative Value_set has contents such that the validator function decided t...">flow::cfg::Final_validator_outcome::S_SKIP</a></code> if it holds, before any further checks (<a class="el" href="cfg__manager__fwd_8hpp.html#a1e8c66781034dd50ad8e2de9c0c47e0e" title="Convenience macro particularly useful in the final_validator_func() callback taken by various Config_...">FLOW_CFG_OPT_CHECK_ASSERT()</a> calls).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ARG_must_be_true</td><td>An expression convertible to <code>bool</code> that should evaluate to <code>true</code> to avoid WARNING and <code>outcome = S_FAIL;</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:32 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
